package cn.sunlight.city.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import org.springframework.data.relational.core.mapping.Table;

import java.io.Serializable;
import java.util.List;

@Data
@ToString
@AllArgsConstructor
@NoArgsConstructor
@TableName("china_city")
public class ChinaCity  implements Serializable {

    private static final long serialVersionUID = -6392593253735340215L;

    private Integer id;
    private String name;
    private Integer level;
    private Integer pid; //父ID

    //子级列表   非表属性
    private List<ChinaCity> childrenList;

}
